﻿@model BenzInfo.Hockey.Grenadiers.Models.Game
@using MvcEnumDropDownList.Helpers;

@{
    ViewBag.Title = BenzInfo.Hockey.Grenadiers.Resources.Dictionary.Create;
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function () {
        $('#DateStart, #DateEnd').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'hh:mm' });
    });

</script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@BenzInfo.Hockey.Grenadiers.Resources.Dictionary.Game</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.TitleEN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TitleEN)
            @Html.ValidationMessageFor(model => model.TitleEN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TitleFR)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TitleFR)
            @Html.ValidationMessageFor(model => model.TitleFR)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ContentEN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ContentEN)
            @Html.ValidationMessageFor(model => model.ContentEN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ContentFR)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ContentFR)
            @Html.ValidationMessageFor(model => model.ContentFR)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HomeTeam)
        </div>
        <div class="editor-field">
            @Html.DropDownList("HomeTeam_Id", (SelectList)@ViewBag.Teams)
            @Html.ValidationMessageFor(model => model.HomeTeam)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HomeScore)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HomeScore)
            @Html.ValidationMessageFor(model => model.HomeScore)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AwayTeam)
        </div>
        <div class="editor-field">
            @Html.DropDownList("AwayTeam_Id", (SelectList)@ViewBag.Teams)
            @Html.ValidationMessageFor(model => model.AwayTeam)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AwayScore)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AwayScore)
            @Html.ValidationMessageFor(model => model.AwayScore)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.GameEnding)
        </div>
        <div class="editor-field">
            @Html.EnumDropDownListFor(model => model.GameEnding, string.Empty)
            @Html.ValidationMessageFor(model => model.GameEnding)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateStart)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateStart)
            @Html.ValidationMessageFor(model => model.DateStart)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateEnd)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateEnd)
            @Html.ValidationMessageFor(model => model.DateEnd)
        </div>
    </fieldset>
}